import type { AxiosResponse, AxiosRequestConfig } from 'axios'

// 请求/响应的拦截器
export interface LRequestInterceptors<T = AxiosResponse> {
  requestInterceptor?: (config: AxiosRequestConfig) => AxiosRequestConfig
  requestInterceptorCatch?: (error: any) => any
  responseInterceptor?: (res: T) => T
  responseInterceptorCatch?: (error: any) => any
}
// 请求的一些配置
export interface LRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
  showLoading?: boolean
  interceptors?: LRequestInterceptors<T>
}
